import threading


class ThreadLocalUtil:
    _thread_local = threading.local()  # 创建线程本地存储对象

    @classmethod
    def get(cls) -> dict:
        """获取线程本地存储的值"""
        return cls._thread_local.value

    @classmethod
    def set(cls, value: dict) -> None:
        """设置线程本地存储的值"""
        cls._thread_local.value = value

    @classmethod
    def remove(cls) -> None:
        """清除线程本地存储的值"""
        if hasattr(cls._thread_local, 'value'):
            del cls._thread_local.value
